<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui" xmlns:f="http://java.sun.com/jsf/core"
                template="/templates/template.xhtml">
    <ui:define name="title">借条用户详情</ui:define>
    <ui:define name="content">
        <h:form>
            <div class="topbar clearfix"
                 style="background: -webkit-linear-gradient(top,#f6f7f9 0,#ebedf0 100%);">
                <p:toolbar>
                    <f:facet name="right">
                        <p:commandButton value="审批通过" icon="fa fa-check"
                                         actionListener="#{receiptSystemUserInfoBean.onApprove(receiptSystemUserInfoBean.$.id)}"
                                         process="@this"
                                         update="@form"
                                         rendered="#{receiptSystemUserInfoBean.$.isApproving()}"/>
                        <p:commandButton value="审批拒绝" icon="fa fa-close"
                                         actionListener="#{receiptSystemUserInfoBean.onReject(receiptSystemUserInfoBean.$.id)}"
                                         process="@this"
                                         update="@form"
                                         rendered="#{receiptSystemUserInfoBean.$.isApproving()}"/>

                        <p:button value="返回" icon="fa fa-reply-all" href="#{currentUserBean.back}"/>
                    </f:facet>
                </p:toolbar>
            </div>
            <div class="ui-fluid" style="padding-top: 30px;">
                <div class="ui-g">
                    <div class="ui-g-12">
                        <div class="card">
                            <h1>用户信息</h1>
                            <p:panelGrid columns="4"
                                         columnClasses="ui-grid-col-2,ui-grid-col-4,ui-grid-col-2,ui-grid-col-4"
                                         layout="grid" styleClass="ui-panelgrid-blank"
                                         style="border:0px none; background-color:transparent;">

                                <p:outputLabel for="name" value="姓名"/>
                                <p:inputText id="name" value="#{receiptSystemUserInfoBean.$.name}"
                                             disabled="#{receiptSystemUserInfoBean.isView()}"/>

                                <p:outputLabel for="account" value="用户名"/>
                                <p:inputText id="account" value="#{receiptSystemUserInfoBean.$.account}"
                                             disabled="#{receiptSystemUserInfoBean.isView()}"/>

                                <p:outputLabel for="email" value="邮箱"/>
                                <p:inputText id="email" value="#{receiptSystemUserInfoBean.$.email}"
                                             disabled="#{receiptSystemUserInfoBean.isView()}"/>

                                <p:outputLabel for="phone" value="联系电话"/>
                                <p:inputText id="phone" value="#{receiptSystemUserInfoBean.$.phone}"
                                             disabled="#{receiptSystemUserInfoBean.isView()}"/>

                                <p:outputLabel for="organization" value="所属机构"/>
                                <p:inputText id="organization" value="#{receiptSystemUserInfoBean.$.organization}"
                                             disabled="#{receiptSystemUserInfoBean.isView()}"/>

                                <p:outputLabel for="remark" value="备注"/>
                                <p:inputTextarea id="remark" value="#{receiptSystemUserInfoBean.$.remark}"
                                                 disabled="#{receiptSystemUserInfoBean.isView()}"/>

                            </p:panelGrid>
                        </div>
                    </div>
                </div>
            </div>
        </h:form>
    </ui:define>
</ui:composition>